package homework_04.home_04;

public class HomeWork_04 {
    /*有2个多维数组分别如下所示*/
    public static void main(String[] args) {
        int [][]a={{2,3,4},{4,6,8}};
        int[][]b={{1,5,2,8},{5,9,10,-3},{2,7,-5,-18}};
        methods(a,b);
    }
    public static void methods(int[][] a,int[][] b){
        int [][]x=new int[2][4];
        for(int i=0; i<a.length;i++){
            for (int j=0;j<b[0].length;j++){
                x[i][j]=a[i][0]*b[0][j]+a[i][1]*b[1][j]+a[i][2]*b[2][j];
                System.out.print(x[i][j]+"  ");
            }
            System.out.println();
        }
    }
}
